package org.huawei260.TiKu.E;// package org.huawei260.TiKu;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class E_2501_2024E_敏感字段加密 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 首先读取命令字的索引
		String indexStr = sc.nextLine().trim();
		int index = -1;
		try {
			index = Integer.parseInt(indexStr);
		} catch (NumberFormatException e) {
			System.out.println("ERROR: Index must be an integer.");
			return;
		}

		// 然后读取命令字符串
		String command = sc.nextLine().trim();

		// 检查索引是否在有效范围内
		if (index < 1) {
			System.out.println("ERROR: Index must be a positive integer.");
			return;
		}

		Map<Integer, String> commandMap = new HashMap<>();
		StringBuilder temp = new StringBuilder();
		int commandIndex = 1;
		boolean inQuotes = false;

		for (int i = 0; i < command.length(); i++) {
			char c = command.charAt(i);
			if (c == '"') {
				inQuotes = !inQuotes; // 切换引号内外状态
				temp.append(c); // 将双引号加入当前命令字
			} else if (c == '_' && !inQuotes) {
				// 如果不在引号内，且temp不为空，保存之前累积的命令字
				if (temp.length() > 0) {
					commandMap.put(commandIndex++, temp.toString());
					temp = new StringBuilder();
				}
			} else {
				temp.append(c); // 将当前字符加入当前命令字
			}
		}

		// 处理最后一个命令字
		if (temp.length() > 0) {
			commandMap.put(commandIndex, temp.toString());
		}

		if (index >= commandMap.size()) {
			System.out.println("ERROR");
			return;
		}

		// 替换指定索引位置的命令字为******
		String encryptedCommand = "";
		int count = 0;
		for (Map.Entry<Integer, String> entry : commandMap.entrySet()) {
			if (count == index) {
				encryptedCommand += "******";
			} else {
				encryptedCommand += entry.getValue();
			}
			if (count < commandMap.size()) {
				encryptedCommand += "_";
			}
			count++;
		}

		System.out.println(encryptedCommand.substring(0, encryptedCommand.length() - 1));
	}
}